//
// CParticleSystem.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CRefCount;
import org.ryzom.nel.misc.CVector;
import org.ryzom.nel.misc.IStream;

public class CParticleSystem extends CRefCount {
  private long swigCPtr;

  public CParticleSystem(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CParticleSystem_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CParticleSystem obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CParticleSystem(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public CParticleSystem() {
    this(nel3dJNI.new_CParticleSystem(), true);
  }

  public void serial(IStream f) {
    nel3dJNI.CParticleSystem_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public boolean merge(CParticleSystemShape toMerge) {
    return nel3dJNI.CParticleSystem_merge(swigCPtr, this, CParticleSystemShape.getCPtr(toMerge), toMerge);
  }

  public void enableSharing(boolean enabled) {
    nel3dJNI.CParticleSystem_enableSharing__SWIG_0(swigCPtr, this, enabled);
  }

  public void enableSharing() {
    nel3dJNI.CParticleSystem_enableSharing__SWIG_1(swigCPtr, this);
  }

  public boolean isSharingEnabled() {
    return nel3dJNI.CParticleSystem_isSharingEnabled(swigCPtr, this);
  }

  public void setDriver(IDriver driver) {
    nel3dJNI.CParticleSystem_setDriver(swigCPtr, this, IDriver.getCPtr(driver), driver);
  }

  public IDriver getDriver() {
    long cPtr = nel3dJNI.CParticleSystem_getDriver(swigCPtr, this);
    return (cPtr == 0) ? null : new IDriver(cPtr, false);
  }

  public void setScene(CScene scene) {
    nel3dJNI.CParticleSystem_setScene(swigCPtr, this, CScene.getCPtr(scene), scene);
  }

  public CScene getScene() {
    long cPtr = nel3dJNI.CParticleSystem_getScene(swigCPtr, this);
    return (cPtr == 0) ? null : new CScene(cPtr, false);
  }

  public void hide(boolean hidden) {
    nel3dJNI.CParticleSystem_hide(swigCPtr, this, hidden);
  }

  public void onShow(boolean shown) {
    nel3dJNI.CParticleSystem_onShow(swigCPtr, this, shown);
  }

  public void setSysMat(SWIGTYPE_p_NLMISC__CMatrix m) {
    nel3dJNI.CParticleSystem_setSysMat(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(m));
  }

  public void setUserMatrix(SWIGTYPE_p_NLMISC__CMatrix m) {
    nel3dJNI.CParticleSystem_setUserMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(m));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getSysMat() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getSysMat(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getInvertedSysMat() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getInvertedSysMat(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getUserMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getUserMatrix(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getInvertedUserMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getInvertedUserMatrix(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getUserToFXMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getUserToFXMatrix(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getFXToUserMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getFXToUserMatrix(swigCPtr, this), false);
  }

  public void setViewMat(SWIGTYPE_p_NLMISC__CMatrix m) {
    nel3dJNI.CParticleSystem_setViewMat(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(m));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getViewMat() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getViewMat(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getInvertedViewMat() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CParticleSystem_getInvertedViewMat(swigCPtr, this), false);
  }

  public void step(CParticleSystem.TPass pass, float ellapsedTime, CParticleSystemShape shape, CParticleSystemModel model) {
    nel3dJNI.CParticleSystem_step(swigCPtr, this, pass.swigValue(), ellapsedTime, CParticleSystemShape.getCPtr(shape), shape, CParticleSystemModel.getCPtr(model), model);
  }

  public static void setNbParticlesDrawn(long value) {
    nel3dJNI.CParticleSystem_NbParticlesDrawn_set(value);
  }

  public static long getNbParticlesDrawn() {
    return nel3dJNI.CParticleSystem_NbParticlesDrawn_get();
  }

  public boolean attach(CParticleSystemProcess process) {
    return nel3dJNI.CParticleSystem_attach(swigCPtr, this, CParticleSystemProcess.getCPtr(process), process);
  }

  public CParticleSystemProcess detach(long index) {
    long cPtr = nel3dJNI.CParticleSystem_detach(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CParticleSystemProcess(cPtr, false);
  }

  public boolean isProcess(CParticleSystemProcess process) {
    return nel3dJNI.CParticleSystem_isProcess(swigCPtr, this, CParticleSystemProcess.getCPtr(process), process);
  }

  public long getIndexOf(CParticleSystemProcess process) {
    return nel3dJNI.CParticleSystem_getIndexOf(swigCPtr, this, CParticleSystemProcess.getCPtr(process), process);
  }

  public void remove(CParticleSystemProcess process) {
    nel3dJNI.CParticleSystem_remove(swigCPtr, this, CParticleSystemProcess.getCPtr(process), process);
  }

  public long getNbProcess() {
    return nel3dJNI.CParticleSystem_getNbProcess(swigCPtr, this);
  }

  public CParticleSystemProcess getProcess(long index) {
    long cPtr = nel3dJNI.CParticleSystem_getProcess__SWIG_0(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CParticleSystemProcess(cPtr, false);
  }

  public float getSystemDate() {
    return nel3dJNI.CParticleSystem_getSystemDate(swigCPtr, this);
  }

  public void setSystemDate(float date) {
    nel3dJNI.CParticleSystem_setSystemDate(swigCPtr, this, date);
  }

  public java.math.BigInteger getDate() {
    return nel3dJNI.CParticleSystem_getDate(swigCPtr, this);
  }

  public void setUserParam(long userParamIndex, float value) {
    nel3dJNI.CParticleSystem_setUserParam(swigCPtr, this, userParamIndex, value);
  }

  public float getUserParam(long userParamIndex) {
    return nel3dJNI.CParticleSystem_getUserParam(swigCPtr, this, userParamIndex);
  }

  public void bindGlobalValueToUserParam(String globalValueName, long userParamIndex) {
    nel3dJNI.CParticleSystem_bindGlobalValueToUserParam(swigCPtr, this, globalValueName, userParamIndex);
  }

  public String getGlobalValueName(long userParamIndex) {
    return nel3dJNI.CParticleSystem_getGlobalValueName(swigCPtr, this, userParamIndex);
  }

  public static void setGlobalValue(String name, float value) {
    nel3dJNI.CParticleSystem_setGlobalValue(name, value);
  }

  public static float getGlobalValue(String name) {
    return nel3dJNI.CParticleSystem_getGlobalValue(name);
  }

  public static void setGlobalVectorValue(String name, CVector value) {
    nel3dJNI.CParticleSystem_setGlobalVectorValue(name, CVector.getCPtr(value), value);
  }

  public static CVector getGlobalVectorValue(String name) {
    return new CVector(nel3dJNI.CParticleSystem_getGlobalVectorValue(name), true);
  }

  public static SWIGTYPE_p_NL3D__CParticleSystem__CGlobalVectorValueHandle getGlobalVectorValueHandle(String name) {
    return new SWIGTYPE_p_NL3D__CParticleSystem__CGlobalVectorValueHandle(nel3dJNI.CParticleSystem_getGlobalVectorValueHandle(name), true);
  }

  public void setCurrentEditedElement(CPSLocated loc, long index, CPSLocatedBindable bd) {
    nel3dJNI.CParticleSystem_setCurrentEditedElement__SWIG_0(swigCPtr, this, CPSLocated.getCPtr(loc), loc, index, CPSLocatedBindable.getCPtr(bd), bd);
  }

  public void setCurrentEditedElement(CPSLocated loc, long index) {
    nel3dJNI.CParticleSystem_setCurrentEditedElement__SWIG_1(swigCPtr, this, CPSLocated.getCPtr(loc), loc, index);
  }

  public void setCurrentEditedElement(CPSLocated loc) {
    nel3dJNI.CParticleSystem_setCurrentEditedElement__SWIG_2(swigCPtr, this, CPSLocated.getCPtr(loc), loc);
  }

  public void setCurrentEditedElement() {
    nel3dJNI.CParticleSystem_setCurrentEditedElement__SWIG_3(swigCPtr, this);
  }

  public void getCurrentEditedElement(SWIGTYPE_p_p_NL3D__CPSLocated loc, SWIGTYPE_p_unsigned_int index, SWIGTYPE_p_p_NL3D__CPSLocatedBindable lb) {
    nel3dJNI.CParticleSystem_getCurrentEditedElement(swigCPtr, this, SWIGTYPE_p_p_NL3D__CPSLocated.getCPtr(loc), SWIGTYPE_p_unsigned_int.getCPtr(index), SWIGTYPE_p_p_NL3D__CPSLocatedBindable.getCPtr(lb));
  }

  public void setFontGenerator(CFontGenerator fg) {
    nel3dJNI.CParticleSystem_setFontGenerator(swigCPtr, this, CFontGenerator.getCPtr(fg), fg);
  }

  public CFontGenerator getFontGenerator() {
    long cPtr = nel3dJNI.CParticleSystem_getFontGenerator__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new CFontGenerator(cPtr, false);
  }

  public void setFontManager(CFontManager fg) {
    nel3dJNI.CParticleSystem_setFontManager(swigCPtr, this, CFontManager.getCPtr(fg), fg);
  }

  public CFontManager getFontManager() {
    long cPtr = nel3dJNI.CParticleSystem_getFontManager__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new CFontManager(cPtr, false);
  }

  public void setName(String s) {
    nel3dJNI.CParticleSystem_setName(swigCPtr, this, s);
  }

  public String getName() {
    return nel3dJNI.CParticleSystem_getName(swigCPtr, this);
  }

  public boolean hasOpaqueObjects() {
    return nel3dJNI.CParticleSystem_hasOpaqueObjects(swigCPtr, this);
  }

  public boolean hasTransparentObjects() {
    return nel3dJNI.CParticleSystem_hasTransparentObjects(swigCPtr, this);
  }

  public boolean hasLightableObjects() {
    return nel3dJNI.CParticleSystem_hasLightableObjects(swigCPtr, this);
  }

  public void enableAccurateIntegration(boolean enable) {
    nel3dJNI.CParticleSystem_enableAccurateIntegration__SWIG_0(swigCPtr, this, enable);
  }

  public void enableAccurateIntegration() {
    nel3dJNI.CParticleSystem_enableAccurateIntegration__SWIG_1(swigCPtr, this);
  }

  public boolean isAccurateIntegrationEnabled() {
    return nel3dJNI.CParticleSystem_isAccurateIntegrationEnabled(swigCPtr, this);
  }

  public void setAccurateIntegrationParams(float threshold, long maxNbIntegrations, boolean canSlowDown, boolean keepEllapsedTimeForLifeUpdate) {
    nel3dJNI.CParticleSystem_setAccurateIntegrationParams(swigCPtr, this, threshold, maxNbIntegrations, canSlowDown, keepEllapsedTimeForLifeUpdate);
  }

  public void getAccurateIntegrationParams(SWIGTYPE_p_float threshold, SWIGTYPE_p_unsigned_int maxNbIntegrations, SWIGTYPE_p_bool canSlowDown, SWIGTYPE_p_bool keepEllapsedTimeForLifeUpdate) {
    nel3dJNI.CParticleSystem_getAccurateIntegrationParams(swigCPtr, this, SWIGTYPE_p_float.getCPtr(threshold), SWIGTYPE_p_unsigned_int.getCPtr(maxNbIntegrations), SWIGTYPE_p_bool.getCPtr(canSlowDown), SWIGTYPE_p_bool.getCPtr(keepEllapsedTimeForLifeUpdate));
  }

  public float getTimeTheshold() {
    return nel3dJNI.CParticleSystem_getTimeTheshold(swigCPtr, this);
  }

  public long getMaxNbIntegrations() {
    return nel3dJNI.CParticleSystem_getMaxNbIntegrations(swigCPtr, this);
  }

  public void setBypassMaxNumIntegrationSteps(boolean bypass) {
    nel3dJNI.CParticleSystem_setBypassMaxNumIntegrationSteps__SWIG_0(swigCPtr, this, bypass);
  }

  public void setBypassMaxNumIntegrationSteps() {
    nel3dJNI.CParticleSystem_setBypassMaxNumIntegrationSteps__SWIG_1(swigCPtr, this);
  }

  public boolean getBypassMaxNumIntegrationSteps() {
    return nel3dJNI.CParticleSystem_getBypassMaxNumIntegrationSteps(swigCPtr, this);
  }

  public boolean canFinish(SWIGTYPE_p_p_NL3D__CPSLocatedBindable lastingForeverObj) {
    return nel3dJNI.CParticleSystem_canFinish__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_NL3D__CPSLocatedBindable.getCPtr(lastingForeverObj));
  }

  public boolean canFinish() {
    return nel3dJNI.CParticleSystem_canFinish__SWIG_1(swigCPtr, this);
  }

  public boolean hasLoop(SWIGTYPE_p_p_NL3D__CPSLocatedBindable loopingObj) {
    return nel3dJNI.CParticleSystem_hasLoop__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_NL3D__CPSLocatedBindable.getCPtr(loopingObj));
  }

  public boolean hasLoop() {
    return nel3dJNI.CParticleSystem_hasLoop__SWIG_1(swigCPtr, this);
  }

  public void setMaxViewDist(float maxDist) {
    nel3dJNI.CParticleSystem_setMaxViewDist(swigCPtr, this, maxDist);
  }

  public float getMaxViewDist() {
    return nel3dJNI.CParticleSystem_getMaxViewDist(swigCPtr, this);
  }

  public void setLODRatio(float ratio) {
    nel3dJNI.CParticleSystem_setLODRatio(swigCPtr, this, ratio);
  }

  public float getLODRatio() {
    return nel3dJNI.CParticleSystem_getLODRatio(swigCPtr, this);
  }

  public void getLODVect(CVector v, SWIGTYPE_p_float offset, SWIGTYPE_p_TPSMatrixMode matrixMode) {
    nel3dJNI.CParticleSystem_getLODVect(swigCPtr, this, CVector.getCPtr(v), v, SWIGTYPE_p_float.getCPtr(offset), SWIGTYPE_p_TPSMatrixMode.getCPtr(matrixMode));
  }

  public SWIGTYPE_p_TPSLod getLOD() {
    return new SWIGTYPE_p_TPSLod(nel3dJNI.CParticleSystem_getLOD(swigCPtr, this), true);
  }

  public float getOneMinusCurrentLODRatio() {
    return nel3dJNI.CParticleSystem_getOneMinusCurrentLODRatio(swigCPtr, this);
  }

  public void enableAutoLOD(boolean enabled) {
    nel3dJNI.CParticleSystem_enableAutoLOD__SWIG_0(swigCPtr, this, enabled);
  }

  public void enableAutoLOD() {
    nel3dJNI.CParticleSystem_enableAutoLOD__SWIG_1(swigCPtr, this);
  }

  public boolean isAutoLODEnabled() {
    return nel3dJNI.CParticleSystem_isAutoLODEnabled(swigCPtr, this);
  }

  public void setupAutoLOD(float startDistPercent, short degradationExponent) {
    nel3dJNI.CParticleSystem_setupAutoLOD(swigCPtr, this, startDistPercent, degradationExponent);
  }

  public void setMaxDistLODBias(float lodBias) {
    nel3dJNI.CParticleSystem_setMaxDistLODBias(swigCPtr, this, lodBias);
  }

  public float getMaxDistLODBias() {
    return nel3dJNI.CParticleSystem_getMaxDistLODBias(swigCPtr, this);
  }

  public float getAutoLODStartDistPercent() {
    return nel3dJNI.CParticleSystem_getAutoLODStartDistPercent(swigCPtr, this);
  }

  public short getAutoLODDegradationExponent() {
    return nel3dJNI.CParticleSystem_getAutoLODDegradationExponent(swigCPtr, this);
  }

  public void setAutoLODMode(boolean skipParticles) {
    nel3dJNI.CParticleSystem_setAutoLODMode(swigCPtr, this, skipParticles);
  }

  public boolean getAutoLODMode() {
    return nel3dJNI.CParticleSystem_getAutoLODMode(swigCPtr, this);
  }

  public void setColorAttenuationScheme(SWIGTYPE_p_CPSAttribMakerT_NLMISC__CRGBA_t colScheme) {
    nel3dJNI.CParticleSystem_setColorAttenuationScheme(swigCPtr, this, SWIGTYPE_p_CPSAttribMakerT_NLMISC__CRGBA_t.getCPtr(colScheme));
  }

  public SWIGTYPE_p_CPSAttribMakerT_NLMISC__CRGBA_t getColorAttenuationScheme() {
    long cPtr = nel3dJNI.CParticleSystem_getColorAttenuationScheme__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_CPSAttribMakerT_NLMISC__CRGBA_t(cPtr, false);
  }

  public void setUserColor(CRGBA userColor) {
    nel3dJNI.CParticleSystem_setUserColor(swigCPtr, this, CRGBA.getCPtr(userColor), userColor);
  }

  public CRGBA getUserColor() {
    return new CRGBA(nel3dJNI.CParticleSystem_getUserColor(swigCPtr, this), true);
  }

  public boolean isUserColorUsed() {
    return nel3dJNI.CParticleSystem_isUserColorUsed(swigCPtr, this);
  }

  public CRGBA getGlobalColor() {
    return new CRGBA(nel3dJNI.CParticleSystem_getGlobalColor(swigCPtr, this), true);
  }

  public CRGBA getGlobalColorLighted() {
    return new CRGBA(nel3dJNI.CParticleSystem_getGlobalColorLighted(swigCPtr, this), true);
  }

  public boolean getForceGlobalColorLightingFlag() {
    return nel3dJNI.CParticleSystem_getForceGlobalColorLightingFlag(swigCPtr, this);
  }

  public void setForceGlobalColorLightingFlag(boolean enable) {
    nel3dJNI.CParticleSystem_setForceGlobalColorLightingFlag(swigCPtr, this, enable);
  }

  public void setLightingColor(CRGBA col) {
    nel3dJNI.CParticleSystem_setLightingColor(swigCPtr, this, CRGBA.getCPtr(col), col);
  }

  public CRGBA getLightingColor() {
    return new CRGBA(nel3dJNI.CParticleSystem_getLightingColor(swigCPtr, this), true);
  }

  public float getWantedNumTris(float dist) {
    return nel3dJNI.CParticleSystem_getWantedNumTris(swigCPtr, this, dist);
  }

  public void setNumTris(long numFaces) {
    nel3dJNI.CParticleSystem_setNumTris(swigCPtr, this, numFaces);
  }

  public boolean isLoadBalancingEnabled() {
    return nel3dJNI.CParticleSystem_isLoadBalancingEnabled(swigCPtr, this);
  }

  public void enableLoadBalancing(boolean enabled) {
    nel3dJNI.CParticleSystem_enableLoadBalancing__SWIG_0(swigCPtr, this, enabled);
  }

  public void enableLoadBalancing() {
    nel3dJNI.CParticleSystem_enableLoadBalancing__SWIG_1(swigCPtr, this);
  }

  public void computeBBox(SWIGTYPE_p_NLMISC__CAABBox aabbox) {
    nel3dJNI.CParticleSystem_computeBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(aabbox));
  }

  public void forceComputeBBox(SWIGTYPE_p_NLMISC__CAABBox aabbox) {
    nel3dJNI.CParticleSystem_forceComputeBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(aabbox));
  }

  public void setAutoComputeBBox(boolean enable) {
    nel3dJNI.CParticleSystem_setAutoComputeBBox__SWIG_0(swigCPtr, this, enable);
  }

  public void setAutoComputeBBox() {
    nel3dJNI.CParticleSystem_setAutoComputeBBox__SWIG_1(swigCPtr, this);
  }

  public boolean getAutoComputeBBox() {
    return nel3dJNI.CParticleSystem_getAutoComputeBBox(swigCPtr, this);
  }

  public void setPrecomputedBBox(SWIGTYPE_p_NLMISC__CAABBox precompBBox) {
    nel3dJNI.CParticleSystem_setPrecomputedBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(precompBBox));
  }

  public void getLastComputedBBox(SWIGTYPE_p_NLMISC__CAABBox dest) {
    nel3dJNI.CParticleSystem_getLastComputedBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(dest));
  }

  public void setDestroyModelWhenOutOfRange(boolean enable) {
    nel3dJNI.CParticleSystem_setDestroyModelWhenOutOfRange__SWIG_0(swigCPtr, this, enable);
  }

  public void setDestroyModelWhenOutOfRange() {
    nel3dJNI.CParticleSystem_setDestroyModelWhenOutOfRange__SWIG_1(swigCPtr, this);
  }

  public boolean getDestroyModelWhenOutOfRange() {
    return nel3dJNI.CParticleSystem_getDestroyModelWhenOutOfRange(swigCPtr, this);
  }

  public void setDestroyCondition(CParticleSystem.TDieCondition dieCondition) {
    nel3dJNI.CParticleSystem_setDestroyCondition(swigCPtr, this, dieCondition.swigValue());
  }

  public boolean isDestroyConditionVerified() {
    return nel3dJNI.CParticleSystem_isDestroyConditionVerified(swigCPtr, this);
  }

  public CParticleSystem.TDieCondition getDestroyCondition() {
    return CParticleSystem.TDieCondition.swigToEnum(nel3dJNI.CParticleSystem_getDestroyCondition(swigCPtr, this));
  }

  public void setDelayBeforeDeathConditionTest(float delay) {
    nel3dJNI.CParticleSystem_setDelayBeforeDeathConditionTest(swigCPtr, this, delay);
  }

  public void systemDurationChanged() {
    nel3dJNI.CParticleSystem_systemDurationChanged(swigCPtr, this);
  }

  public float getDelayBeforeDeathConditionTest() {
    return nel3dJNI.CParticleSystem_getDelayBeforeDeathConditionTest(swigCPtr, this);
  }

  public void setAutoComputeDelayBeforeDeathConditionTest(boolean computeAuto) {
    nel3dJNI.CParticleSystem_setAutoComputeDelayBeforeDeathConditionTest(swigCPtr, this, computeAuto);
  }

  public boolean getAutoComputeDelayBeforeDeathConditionTest() {
    return nel3dJNI.CParticleSystem_getAutoComputeDelayBeforeDeathConditionTest(swigCPtr, this);
  }

  public void destroyWhenOutOfFrustum(boolean enable) {
    nel3dJNI.CParticleSystem_destroyWhenOutOfFrustum__SWIG_0(swigCPtr, this, enable);
  }

  public void destroyWhenOutOfFrustum() {
    nel3dJNI.CParticleSystem_destroyWhenOutOfFrustum__SWIG_1(swigCPtr, this);
  }

  public boolean doesDestroyWhenOutOfFrustum() {
    return nel3dJNI.CParticleSystem_doesDestroyWhenOutOfFrustum(swigCPtr, this);
  }

  public boolean hasEmitters() {
    return nel3dJNI.CParticleSystem_hasEmitters(swigCPtr, this);
  }

  public boolean hasParticles() {
    return nel3dJNI.CParticleSystem_hasParticles(swigCPtr, this);
  }

  public boolean hasTemporaryParticles() {
    return nel3dJNI.CParticleSystem_hasTemporaryParticles(swigCPtr, this);
  }

  public void performMotionWhenOutOfFrustum(boolean enable) {
    nel3dJNI.CParticleSystem_performMotionWhenOutOfFrustum__SWIG_0(swigCPtr, this, enable);
  }

  public void performMotionWhenOutOfFrustum() {
    nel3dJNI.CParticleSystem_performMotionWhenOutOfFrustum__SWIG_1(swigCPtr, this);
  }

  public boolean doesPerformMotionWhenOutOfFrustum() {
    return nel3dJNI.CParticleSystem_doesPerformMotionWhenOutOfFrustum(swigCPtr, this);
  }

  public void setAnimType(CParticleSystem.TAnimType animType) {
    nel3dJNI.CParticleSystem_setAnimType(swigCPtr, this, animType.swigValue());
  }

  public CParticleSystem.TAnimType getAnimType() {
    return CParticleSystem.TAnimType.swigToEnum(nel3dJNI.CParticleSystem_getAnimType(swigCPtr, this));
  }

  public void activatePresetBehaviour(CParticleSystem.TPresetBehaviour behaviour) {
    nel3dJNI.CParticleSystem_activatePresetBehaviour(swigCPtr, this, behaviour.swigValue());
  }

  public CParticleSystem.TPresetBehaviour getBehaviourType() {
    return CParticleSystem.TPresetBehaviour.swigToEnum(nel3dJNI.CParticleSystem_getBehaviourType(swigCPtr, this));
  }

  public static void registerSoundServer(UPSSoundServer soundServer) {
    nel3dJNI.CParticleSystem_registerSoundServer(UPSSoundServer.getCPtr(soundServer), soundServer);
  }

  public static UPSSoundServer getSoundServer() {
    long cPtr = nel3dJNI.CParticleSystem_getSoundServer();
    return (cPtr == 0) ? null : new UPSSoundServer(cPtr, false);
  }

  public void stopSound() {
    nel3dJNI.CParticleSystem_stopSound(swigCPtr, this);
  }

  public void reactivateSound() {
    nel3dJNI.CParticleSystem_reactivateSound(swigCPtr, this);
  }

  public void registerLocatedBindableExternID(long id, CPSLocatedBindable lb) {
    nel3dJNI.CParticleSystem_registerLocatedBindableExternID(swigCPtr, this, id, CPSLocatedBindable.getCPtr(lb), lb);
  }

  public void unregisterLocatedBindableExternID(CPSLocatedBindable lb) {
    nel3dJNI.CParticleSystem_unregisterLocatedBindableExternID(swigCPtr, this, CPSLocatedBindable.getCPtr(lb), lb);
  }

  public long getNumLocatedBindableByExternID(long id) {
    return nel3dJNI.CParticleSystem_getNumLocatedBindableByExternID(swigCPtr, this, id);
  }

  public CPSLocatedBindable getLocatedBindableByExternID(long id, long index) {
    long cPtr = nel3dJNI.CParticleSystem_getLocatedBindableByExternID__SWIG_0(swigCPtr, this, id, index);
    return (cPtr == 0) ? null : new CPSLocatedBindable(cPtr, false);
  }

  public long getNumID() {
    return nel3dJNI.CParticleSystem_getNumID(swigCPtr, this);
  }

  public long getID(long index) {
    return nel3dJNI.CParticleSystem_getID(swigCPtr, this, index);
  }

  public void getIDs(Vector_uint16 dest) {
    nel3dJNI.CParticleSystem_getIDs(swigCPtr, this, Vector_uint16.getCPtr(dest), dest);
  }

  public void enableEmitThreshold(boolean enabled) {
    nel3dJNI.CParticleSystem_enableEmitThreshold__SWIG_0(swigCPtr, this, enabled);
  }

  public void enableEmitThreshold() {
    nel3dJNI.CParticleSystem_enableEmitThreshold__SWIG_1(swigCPtr, this);
  }

  public boolean isEmitThresholdEnabled() {
    return nel3dJNI.CParticleSystem_isEmitThresholdEnabled(swigCPtr, this);
  }

  public void activateEmitters(boolean active) {
    nel3dJNI.CParticleSystem_activateEmitters(swigCPtr, this, active);
  }

  public boolean hasActiveEmitters() {
    return nel3dJNI.CParticleSystem_hasActiveEmitters(swigCPtr, this);
  }

  public boolean hasEmittersTemplates() {
    return nel3dJNI.CParticleSystem_hasEmittersTemplates(swigCPtr, this);
  }

  public float evalDuration() {
    return nel3dJNI.CParticleSystem_evalDuration(swigCPtr, this);
  }

  public void setAutoCountFlag(boolean enabled) {
    nel3dJNI.CParticleSystem_setAutoCountFlag(swigCPtr, this, enabled);
  }

  public boolean getAutoCountFlag() {
    return nel3dJNI.CParticleSystem_getAutoCountFlag(swigCPtr, this);
  }

  public void matchArraySize() {
    nel3dJNI.CParticleSystem_matchArraySize(swigCPtr, this);
  }

  public long getMaxNumParticles() {
    return nel3dJNI.CParticleSystem_getMaxNumParticles(swigCPtr, this);
  }

  public long getCurrNumParticles() {
    return nel3dJNI.CParticleSystem_getCurrNumParticles(swigCPtr, this);
  }

  public void getTargeters(CPSLocated target, SWIGTYPE_p_std__vectorT_CPSTargetLocatedBindable_p_t targeters) {
    nel3dJNI.CParticleSystem_getTargeters(swigCPtr, this, CPSLocated.getCPtr(target), target, SWIGTYPE_p_std__vectorT_CPSTargetLocatedBindable_p_t.getCPtr(targeters));
  }

  public static void setSerializeIdentifierFlag(boolean on) {
    nel3dJNI.CParticleSystem_setSerializeIdentifierFlag(on);
  }

  public static boolean getSerializeIdentifierFlag() {
    return nel3dJNI.CParticleSystem_getSerializeIdentifierFlag();
  }

  public void enumTexs(SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__ITexture_t_t dest, IDriver drv) {
    nel3dJNI.CParticleSystem_enumTexs(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__ITexture_t_t.getCPtr(dest), IDriver.getCPtr(drv), drv);
  }

  public void setZBias(float value) {
    nel3dJNI.CParticleSystem_setZBias(swigCPtr, this, value);
  }

  public static void forceDisplayBBox(boolean on) {
    nel3dJNI.CParticleSystem_forceDisplayBBox(on);
  }

  public void getSortingByEmitterPrecedence(Vector_uint16 result) {
    nel3dJNI.CParticleSystem_getSortingByEmitterPrecedence(swigCPtr, this, Vector_uint16.getCPtr(result), result);
  }

  public void interpolateFXPosDelta(CVector dest, float deltaT) {
    nel3dJNI.CParticleSystem_interpolateFXPosDelta(swigCPtr, this, CVector.getCPtr(dest), dest, deltaT);
  }

  public void interpolateUserPosDelta(CVector dest, float deltaT) {
    nel3dJNI.CParticleSystem_interpolateUserPosDelta(swigCPtr, this, CVector.getCPtr(dest), dest, deltaT);
  }

  public float getAutoLODEmitRatio() {
    return nel3dJNI.CParticleSystem_getAutoLODEmitRatio(swigCPtr, this);
  }

  public void matrixModeChanged(CParticleSystemProcess proc, SWIGTYPE_p_TPSMatrixMode oldMode, SWIGTYPE_p_TPSMatrixMode newMode) {
    nel3dJNI.CParticleSystem_matrixModeChanged(swigCPtr, this, CParticleSystemProcess.getCPtr(proc), proc, SWIGTYPE_p_TPSMatrixMode.getCPtr(oldMode), SWIGTYPE_p_TPSMatrixMode.getCPtr(newMode));
  }

  public void addRefForUserSysCoordInfo(long numRefs) {
    nel3dJNI.CParticleSystem_addRefForUserSysCoordInfo__SWIG_0(swigCPtr, this, numRefs);
  }

  public void addRefForUserSysCoordInfo() {
    nel3dJNI.CParticleSystem_addRefForUserSysCoordInfo__SWIG_1(swigCPtr, this);
  }

  public void releaseRefForUserSysCoordInfo(long numRefs) {
    nel3dJNI.CParticleSystem_releaseRefForUserSysCoordInfo__SWIG_0(swigCPtr, this, numRefs);
  }

  public void releaseRefForUserSysCoordInfo() {
    nel3dJNI.CParticleSystem_releaseRefForUserSysCoordInfo__SWIG_1(swigCPtr, this);
  }

  public void dumpHierarchy() {
    nel3dJNI.CParticleSystem_dumpHierarchy(swigCPtr, this);
  }

  public static void set_Spawns(SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__CSpawnVect_t_t value) {
    nel3dJNI.CParticleSystem__Spawns_set(SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__CSpawnVect_t_t.getCPtr(value));
  }

  public static SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__CSpawnVect_t_t get_Spawns() {
    long cPtr = nel3dJNI.CParticleSystem__Spawns_get();
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__CSpawnVect_t_t(cPtr, false);
  }

  public static void set_ParticleToRemove(Vector_uint16 value) {
    nel3dJNI.CParticleSystem__ParticleToRemove_set(Vector_uint16.getCPtr(value), value);
  }

  public static Vector_uint16 get_ParticleToRemove() {
    long cPtr = nel3dJNI.CParticleSystem__ParticleToRemove_get();
    return (cPtr == 0) ? null : new Vector_uint16(cPtr, false);
  }

  public static void set_ParticleRemoveListIndex(SWIGTYPE_p_std__vectorT_int_t value) {
    nel3dJNI.CParticleSystem__ParticleRemoveListIndex_set(SWIGTYPE_p_std__vectorT_int_t.getCPtr(value));
  }

  public static SWIGTYPE_p_std__vectorT_int_t get_ParticleRemoveListIndex() {
    long cPtr = nel3dJNI.CParticleSystem__ParticleRemoveListIndex_get();
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_int_t(cPtr, false);
  }

  public static void set_CollidingParticles(Vector_uint16 value) {
    nel3dJNI.CParticleSystem__CollidingParticles_set(Vector_uint16.getCPtr(value), value);
  }

  public static Vector_uint16 get_CollidingParticles() {
    long cPtr = nel3dJNI.CParticleSystem__CollidingParticles_get();
    return (cPtr == 0) ? null : new Vector_uint16(cPtr, false);
  }

  public static void set_SpawnPos(Vector_CVector value) {
    nel3dJNI.CParticleSystem__SpawnPos_set(Vector_CVector.getCPtr(value), value);
  }

  public static Vector_CVector get_SpawnPos() {
    long cPtr = nel3dJNI.CParticleSystem__SpawnPos_get();
    return (cPtr == 0) ? null : new Vector_CVector(cPtr, false);
  }

  public static void setEllapsedTime(float value) {
    nel3dJNI.CParticleSystem_EllapsedTime_set(value);
  }

  public static float getEllapsedTime() {
    return nel3dJNI.CParticleSystem_EllapsedTime_get();
  }

  public static void setInverseTotalEllapsedTime(float value) {
    nel3dJNI.CParticleSystem_InverseTotalEllapsedTime_set(value);
  }

  public static float getInverseTotalEllapsedTime() {
    return nel3dJNI.CParticleSystem_InverseTotalEllapsedTime_get();
  }

  public static void setRealEllapsedTime(float value) {
    nel3dJNI.CParticleSystem_RealEllapsedTime_set(value);
  }

  public static float getRealEllapsedTime() {
    return nel3dJNI.CParticleSystem_RealEllapsedTime_get();
  }

  public static void setRealEllapsedTimeRatio(float value) {
    nel3dJNI.CParticleSystem_RealEllapsedTimeRatio_set(value);
  }

  public static float getRealEllapsedTimeRatio() {
    return nel3dJNI.CParticleSystem_RealEllapsedTimeRatio_get();
  }

  public static void setInsideSimLoop(boolean value) {
    nel3dJNI.CParticleSystem_InsideSimLoop_set(value);
  }

  public static boolean getInsideSimLoop() {
    return nel3dJNI.CParticleSystem_InsideSimLoop_get();
  }

  public static void setInsideRemoveLoop(boolean value) {
    nel3dJNI.CParticleSystem_InsideRemoveLoop_set(value);
  }

  public static boolean getInsideRemoveLoop() {
    return nel3dJNI.CParticleSystem_InsideRemoveLoop_get();
  }

  public static void setInsideNewElementsLoop(boolean value) {
    nel3dJNI.CParticleSystem_InsideNewElementsLoop_set(value);
  }

  public static boolean getInsideNewElementsLoop() {
    return nel3dJNI.CParticleSystem_InsideNewElementsLoop_get();
  }

  public static void setOwnerModel(CParticleSystemModel value) {
    nel3dJNI.CParticleSystem_OwnerModel_set(CParticleSystemModel.getCPtr(value), value);
  }

  public static CParticleSystemModel getOwnerModel() {
    long cPtr = nel3dJNI.CParticleSystem_OwnerModel_get();
    return (cPtr == 0) ? null : new CParticleSystemModel(cPtr, false);
  }

  public final static class TPass {
    public final static TPass Anim = new TPass("Anim");
    public final static TPass SolidRender = new TPass("SolidRender");
    public final static TPass BlendRender = new TPass("BlendRender");
    public final static TPass ToolRender = new TPass("ToolRender");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TPass swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TPass.class + " with value " + swigValue);
    }

    private TPass(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TPass(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TPass(String swigName, TPass swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TPass[] swigValues = { Anim, SolidRender, BlendRender, ToolRender };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TDieCondition {
    public final static TDieCondition none = new TDieCondition("none");
    public final static TDieCondition noMoreParticles = new TDieCondition("noMoreParticles");
    public final static TDieCondition noMoreParticlesAndEmitters = new TDieCondition("noMoreParticlesAndEmitters");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TDieCondition swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TDieCondition.class + " with value " + swigValue);
    }

    private TDieCondition(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TDieCondition(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TDieCondition(String swigName, TDieCondition swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TDieCondition[] swigValues = { none, noMoreParticles, noMoreParticlesAndEmitters };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TAnimType {
    public final static TAnimType AnimVisible = new TAnimType("AnimVisible", nel3dJNI.CParticleSystem_AnimVisible_get());
    public final static TAnimType AnimInCluster = new TAnimType("AnimInCluster");
    public final static TAnimType AnimAlways = new TAnimType("AnimAlways");
    public final static TAnimType LastValue = new TAnimType("LastValue");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TAnimType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TAnimType.class + " with value " + swigValue);
    }

    private TAnimType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TAnimType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TAnimType(String swigName, TAnimType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TAnimType[] swigValues = { AnimVisible, AnimInCluster, AnimAlways, LastValue };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TPresetBehaviour {
    public final static TPresetBehaviour EnvironmentFX = new TPresetBehaviour("EnvironmentFX", nel3dJNI.CParticleSystem_EnvironmentFX_get());
    public final static TPresetBehaviour RunningEnvironmentFX = new TPresetBehaviour("RunningEnvironmentFX");
    public final static TPresetBehaviour SpellFX = new TPresetBehaviour("SpellFX");
    public final static TPresetBehaviour LoopingSpellFX = new TPresetBehaviour("LoopingSpellFX");
    public final static TPresetBehaviour MinorFX = new TPresetBehaviour("MinorFX");
    public final static TPresetBehaviour UserBehaviour = new TPresetBehaviour("UserBehaviour");
    public final static TPresetBehaviour MovingLoopingFX = new TPresetBehaviour("MovingLoopingFX");
    public final static TPresetBehaviour SpawnedEnvironmentFX = new TPresetBehaviour("SpawnedEnvironmentFX");
    public final static TPresetBehaviour GroundFX = new TPresetBehaviour("GroundFX");
    public final static TPresetBehaviour Projectile = new TPresetBehaviour("Projectile");
    public final static TPresetBehaviour PresetLast = new TPresetBehaviour("PresetLast");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TPresetBehaviour swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TPresetBehaviour.class + " with value " + swigValue);
    }

    private TPresetBehaviour(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TPresetBehaviour(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TPresetBehaviour(String swigName, TPresetBehaviour swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TPresetBehaviour[] swigValues = { EnvironmentFX, RunningEnvironmentFX, SpellFX, LoopingSpellFX, MinorFX, UserBehaviour, MovingLoopingFX, SpawnedEnvironmentFX, GroundFX, Projectile, PresetLast };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
